#pragma
#include <widgets/SPopupWindow.h>

class QLineEdit;
class SCheckEx;
class QGridLayout;
class QLabel;

class ProxySettingDlg : public SPopupWindow {
 public:
  ProxySettingDlg(QWidget*);

 public slots:
  void onRadioStateChanged(int index);

 private slots:
  void onClickConfirm();
  void onTestLink();
  void onSaveProxy();

 private:
  void enableProxy(bool enable);

 private:
  QGridLayout* proxyTypeLayout = nullptr;
  QGridLayout* proxyAccountLayout = nullptr;
  SCheckEx* m_noProxy = nullptr;
  SCheckEx* m_ownProxy = nullptr;
  SCheckEx* m_socket4 = nullptr;
  SCheckEx* m_socket5 = nullptr;
  SCheckEx* m_https = nullptr;
  QLabel* m_address = nullptr;
  QLineEdit* m_editAddress = nullptr;
  QLabel* m_port = nullptr;
  QLineEdit* m_editPort = nullptr;
  QLabel* m_userName = nullptr;
  QLineEdit* m_editUserName = nullptr;
  QLabel* m_pwd = nullptr;
  QLineEdit* m_editPwd = nullptr;
  QLabel* m_labelMac = nullptr;
  QLabel* m_LableMacAddress = nullptr;
  QLabel* m_linkTestStr = nullptr;
};